﻿using Core;
using Core.Domain.Catalog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.Catelog
{
    /// <summary>
    /// 类别服务接口
    /// </summary>
    public partial interface ICategoryService
    {
        /// <summary>
        /// 删除类别
        /// </summary>
        void DeleteCategory(Category category);

        /// <summary>
        /// 获取所有类别
        /// </summary>
        IPagedList<Category> GetAllCategories(string categoryName = "",
            int pageIndex = 0, int pageSize = int.MaxValue);

        /// <summary>
        /// 根据父Id获取类别集合
        /// </summary>
        IList<Category> GetAllCategoriesByParentCategoryId(int parentCategoryId);


        /// <summary>
        /// 根据主键获取类别
        /// </summary>
        /// <returns>Category</returns>
        Category GetCategoryById(int categoryId);

        /// <summary>
        /// 新增类别
        /// </summary>
        void InsertCategory(Category category);

        /// <summary>
        ///  更新类别
        /// </summary>
        /// <param name="category">Category</param>
        void UpdateCategory(Category category);

    }
}
